#define BOOST_PYTHON_STATIC_LIB

#include <boost/python.hpp>
#include <iostream>
#include <httplib.h>
#include <string>


// Function to print "hello world BOOST PYTHON"
std::string  hello()
{
    httplib::Client cli("127.0.0.1", 6677);
    auto res = cli.Get("/");
    if (res && res->status == 200) {
        return res->body;
    }
    else {
        return "Request failed or no response";
    }
}

// Boost Python module initialization
BOOST_PYTHON_MODULE(Boost_Python_TEST)
{
    // Expose the "hello" function to Python
    boost::python::def("hello", hello);
}